<?php
$lang_slo = trans('view.game.data.settlement.slo');
$lang_boolean = trans('view.form.booleanList');

$result = $detail['details']['result'] ?? [];
?>

@extends('games.base')

@section('content')
    @isset($result)
        @include('games.slo')

        <div class="row">
            @if (isset($result['icon_to_collect']))
                <div class="col">
                    <div class="el-form-item">
                        <label class="el-form-item__label">{{ $lang_slo['icon_to_collect'] }}</label>
                        <div class="el-form-item__content">{{ $result['icon_to_collect'] }}</div>
                    </div>
                </div>
                @if (isset($result['collect_icon']))
                    <div class="col">
                        <div class="el-form-item">
                            <label class="el-form-item__label">{{ $lang_slo['collect_icon'] }}</label>
                            <div class="el-form-item__content">{{ json_encode($result['collect_icon']) }}
                                @if (in_array($result['icon_to_collect'], $result['collect_icon']))
                                    <span class="tag">{{$lang_slo['collect_succeed']}}</span>
                                @endif
                            </div>
                        </div>
                    </div>
                @endif
            @endif
            <div class="col">
                <div class="el-form-item">
                    <label class="el-form-item__label">{{ $lang_slo['win_gold'] }}</label>
                    <div class="el-form-item__content">{{ $result['win_gold'] }}</div>
                </div>
            </div>
            <div class="col">
                <div class="el-form-item">
                    <label class="el-form-item__label">{{ $lang_slo['special_eliminate_number'] }}</label>
                    <div class="el-form-item__content">{{ $lang_boolean[(int)isset($result['special_eliminate_number'])]}}</div>
                </div>
            </div>
        </div>
    @endisset
@endsection
